package publics.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="enterprise_stockholder")
public class EnterpriseStockholder {//股东信息
	
	 private Integer id; // Integer
	 private Enterprise ent;
	 
	 private String name; //股东名称  Variable characters(10)
	 private Integer asset;// 出资额（元） Integer
	 private Float percentage;//占比（%） Float
	 private String way;//出资方式   Variable characters(10)
	 private String phone;//联系电话  Variable characters(12)
	 private String address;//通信地址 Variable characters(40)
	 @Id
	 @GeneratedValue
	 @Column(name="Ent_stockholder_id")
	public Integer getId() {
		return id;
	}
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="Ent_id",nullable=false)
	public Enterprise getEnt() {
		return ent;
	}
	 @Column(name="Ent_stockholder_name")
	public String getName() {
		return name;
	}
	 @Column(name="Ent_stockholder_asset")
	public Integer getAsset() {
		return asset;
	}
	 @Column(name="Ent_stockholder_percentage")
	public Float getPercentage() {
		return percentage;
	}
	 @Column(name="Ent_stockholder_way")
	public String getWay() {
		return way;
	}
	 @Column(name="Ent_stockholder_phone")
	public String getPhone() {
		return phone;
	}
	 @Column(name="Ent_stockholder_address")
	public String getAddress() {
		return address;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setEnt(Enterprise ent) {
		this.ent = ent;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setAsset(Integer asset) {
		this.asset = asset;
	}
	public void setPercentage(Float percentage) {
		this.percentage = percentage;
	}
	public void setWay(String way) {
		this.way = way;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	
	
	public EnterpriseStockholder() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public EnterpriseStockholder(Integer id, String name, Integer asset,
			Float percentage, String way, String phone, String address) {
		super();
		this.id = id;
		this.name = name;
		this.asset = asset;
		this.percentage = percentage;
		this.way = way;
		this.phone = phone;
		this.address = address;
	}
	
	public EnterpriseStockholder(Integer id, Enterprise ent, String name,
			Integer asset, Float percentage, String way, String phone,
			String address) {
		super();
		this.id = id;
		this.ent = ent;
		this.name = name;
		this.asset = asset;
		this.percentage = percentage;
		this.way = way;
		this.phone = phone;
		this.address = address;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "EnterpriseStockholder [address=" + address + ", asset=" + asset
				+ ", ent=" + ent + ", id=" + id
				+ ", name=" + name + ", percentage=" + percentage + ", phone="
				+ phone + ", way=" + way + "]";
	}
	
	
}
